Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

12
Become a Fan
8.3

Description:
Py-Cashew is a KDE4 plasmoid that hides the desktop toolbox, also known as the cashew. Some find the cashew pretty but others who don't have no way to remove it. The KDE developers made it clear that they won't add an option to hide it (see http://userbase.kde.org/Plasma/FAQ/4.4#Please_provide_an_option_to_disable_the_upper_right_cashew.), so this plasmoid offers a way out.

Py-cashew is very much like "I HATE the cashew" that seems to have disappeared from KDE-look.org. It is written in python so you won't have to compile it to use it. It simply hides the cashew, if you need more configurability, take a look at Stealth Cashew http://kde-look.org/content/show.php/Stealth+Cashew?content=108460.

KDE versions 4.6 to 4.11 are supported. Py-cashew may or may not work with previous versions.

Py-Cashew is a stupid name, another reason to try it !
Last changelog:

1.0 first version

1.1 Make it work on kde4.8 in activities like "search and launch"

1.2 Remove __del__, this should fix some potential plasma crash upon logout


Ratings & Comments

28 Comments

soger

I've been using this handy little widget for a really-really long time. Today I've upgraded to ubuntu 14.04 with KDE 4.13 and unfortunately the widget no longer works. A semi-transparent grey box is created (similar for example to the folderview widget) and inside it the text says: This object could not be created for the following reason: Script initialization failed I made sure that plasma-scriptengine-python and python-qt4 is installed, not sure what else to try. Please help.

Jjaan

After enabling plasma-desktop, plasma and libplasma in kdebugdialog, I could see the following error in the file ~/.xsession-errors-:0 : Quote:

File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init self.pyapplet.init() File "/home/jv/.kde4/share/apps/plasma/plasmoids/py-cashew/contents/code/main.py", line 40, in init self.cashews = self.getCashew() File "/home/jv/.kde4/share/apps/plasma/plasmoids/py-cashew/contents/code/main.py", line 66, in getCashew if c.toolBoxItem() != None] RuntimeError: no access to protected functions or signals for objects not created from Python
So it seems that the reason is bug https://bugs.kde.org/show_bug.cgi?id=325667 . I am not an expert in Plasma, but I understand from the bug description that the mechanism used by PyCashew is deprecated now by the Plasma API developers. But I wonder: does this mean that there is currently no workaround to fix PyCashew and we should ask the Plasma developers to add a new feature that would allow disabling the cashew (either built in or using a widget like PyCashew)? Is there a bug to vote for?

soger

Yeah... don't bother voting. KDE developers say the cachew is an integral part of plasma and they refuse to remove it, so unless the developer of this plugin can figure something out, I'm afraid we are out of options. BTW, there's another plugin, it's called maybe "stealth cachew", not sure though, I don't remember. That one is able to make the cachew completely transparent, so you don't see it, but if you accidentally click on it's location, a menu pops out from nowhere, so that's even worse in my opinion, but I'm still mentioning it, because others may like it.

frumble

This won't help much but it is the best tip I can give: Move the damn thing *under* your panel, e.g. under the clock plasmoid or the notification icons.

Jjaan

soger, frumble, thank you for the tips! I moved the cashew under the clock, so it didn't interact with mouse any more and became only barely visible (because the panel is semi-transparent). Then I applied Stealth Cashew to make it totally invisible. I guess the Stealth Cashew script will now be eating some milliseconds of KDE startup time and some memory (it needs to load Ruby and all), but probably not very much compared to the rest.

soger

Interesting solution, I didn't think of it because I remember some years ago you couldn't move the cachew below the panel, KDE kept relocating it, but fortunately in 4.13 you can. Stealth cachew has it's own problems, but I better report them on it's own page.

TheStarLion

Running on Debian Testing (Jessie). Py-Cashew can be installed from Get New Stuff or downloaded and installed locally without a problem, but on attempting to add the plasmoid to the desktop, plasma-desktop segfaults and reloads, complete with cashew.

BenoitMonin

This is caused by a bug in the updated python-sip package, starting with version 4.15. I opened a bug in kde bugzilla: https://bugs.kde.org/show_bug.cgi?id=325667

jjordanthesailor

"script initialization failed" in widget "no access to protected functions or signals for objects not created from Python" when run in plasmoidviewer. Thanks for making this, it is always the first widget I install!

Pulfer

I get the same error. Something is wrong with access to containment.toolBoxItem()

BenoitMonin

This is a known problem: https://github.com/benoit-monin/Py-Cashew/issues/3 There is nothing I can do about it, I opened a ticket in kde bugzilla: https://bugs.kde.org/show_bug.cgi?id=325667 Feel free to add a comment there.

SicoBulo

When I try to install it I get this nice mesagge: http://img441.imageshack.us/img441/1039/nbu4.png In spanish: "Failed to install package /home/myfolder/Downloads/pycashew.plasmoid" And as the web based installer of plasma says nothing, I will never know that this new versión of py-cashew is faulty. It still works with KDE 4.8.x? I got no problems with 1.0... ¿Where I can get the 1.0?

SicoBulo

I forgot to mention that I already installed plasma-scriptengines-python, as I said, PyCashew 1.0 worked without problems.

SicoBulo

I downloaded the source code from the git repository and made the installation from it, and works! The file you provide in the link seems corrupted, as I had no way to make it work.

oOSplashOo

Ha thanks you, I used "I HATE the cashew" until now but was disapointed by the lack of support for search and launch. Thanks to you I can now get rid of of that little piece of uselessness.

anomaly256

From the Plasma FAQ: Quote:

Although putting an option to disable the cashew for desktops sounds reasonable, from a coding point of view it would introduce unnecessary complexity and would break the design.
Lol. Complete rubbish. This is just a cop-out, lazy excuse. Someone thought the cashew was a brilliant idea and their egos are bruised because people are rejecting it so they've decided to tell people what they want instead of listening to what they want. The fact that people have written *several* plugins to do this a) proves it's simple to implement and b) proves that people WANT it. I can't believe any self-respecting developer would try to shovel these lies. If you were working on my team and tried to pull this crap I'd fire you in a heartbeat. It's nonsense like this that is keeping people suffering through gnome3 and unity because 'kde? but it still sucks, doesn't it?' - they're half right and you only have yourselves to blame.

mmj

Is my interpretation correct, that your OSS contribution basically sums up to this post? You are free to make suggestions, but do not attack devs personally. I don’t know the architectural backgrounds to the FAQ response, but as a developer, I see, that some simple things may violate archtectural guidelines. Braking the guidelines may increase the bug count and complicates debugging. So without knowing the code, the only question is, why they don't ship the plasmoid script with the SC. Either it is something personal, or they just think kde-apps is as good, and this way they don't have to care for the code. I think it is a legitim decission.

anomaly256

Quote:

Is my interpretation correct, that your OSS contribution basically sums up to this post?
What? Why/how can you make this epic leap with 0 information? Clearly this can only be an attempt to insult me personally. Nice try but you should keep jumping to huge conclusions to a minimum if possible. As a developer you should know better; be pragmatic and rational. Quote:
I don’t know the architectural backgrounds to the FAQ response, but as a developer, I see, that some simple things may violate archtectural guidelines. Braking the guidelines may increase the bug count and complicates debugging.
It's an annoying widget that many people have asked to be removed. To remove it is easy (look at the code in this widget that removes it). As a developer (as you claim) you should know better. Nothing breaks with the cashew gone otherwise people who use this cashew-removal widget would be having problems - I've been using it ever since they forced the cashew on us and have had absolutely 0 issues because of it. To refuse to allow this option in the desktop settings directly and forcing people (who may not actually know how to install this) to hunt down 3rd party in-situ patchers to remove it is arrogant, egotistical, nonsensical and there's really no practical way you can actually defend this. Please stop making excuses for the people force-feeding the cashew to us. It's really not your place to do so. If they have issue with our statements they can defend their decisions themselves but I sincerely doubt they will be successful in doing so. Again, there is no excuse for this stance the developers have taken. None. Not stability concerns, not UI paradigm concerns, not application functionality concerns. Nothing. Your defence is baseless. And even if somehow there were UI paradigm or application functionality concerns then I would remind you that developers, you and me, do not write software to support machines and APIs. We do not write software to make applications happy. We write software to support users. The software we write should make users happy. If we're failing to do that then we're failing as developers and our design guidelines are broken. End of story - no excuses. Quote:
So without knowing the code, the only question is, why they don't ship the plasmoid script with the SC. Either it is something personal, or they just think kde-apps is as good, and this way they don't have to care for the code. I think it is a legitim decission.
Except the plasmoid's supported KDE version sometimes lags behind the SC releases - previously I've had to hand-patch this widget to keep it working after some API change. No offence to the author of this widget but it really shouldn't be their job to fix the KDE maintainers' nonsense *every release* and breaking API change. This really should be an option within KDE itself and the only reason in all of the known universe for not doing so is because someone somewhere refuses to admit that there are some people who really don't like their 'bright idea' that they take too much pride in.

oserres

Works very well, thank you. This is crazy that there is still no option in kde to remove that ugly thing.

pbvijay

Thank you Very much for the widgets. Works fine

avlas

to me there is no need for the cashew anymore, so it's good to have the option to remove it if wanted thanks

s2012

how do i run this script im new to linux sorry if this reads like a dumb question

BenoitMonin

Install py-cashew by following the method described here : http://userbase.kde.org/Plasma/Installing_Plasmoids#Installing_from_KDE-Look.org Then just drop the newly installed plasmoid to your desktop and the cashew will disappear.

HerrWeigel

Great script, thank you! But in KDE 4.8 it doesn't work if layout's type is "Search and Launch". With all other layouts it works very good

BenoitMonin

Good catch ! I have made a quick test: It's also failing in other activities in kde 4.8. I'll look into that and update py-cashew.

Pling
0 Affiliates
Details
license
version 1.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 13 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 13 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0